package com.easylinkin.linkappapi.crane.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 吊机业务数据记录表
 *
 * @author xy
 * @since 2025-06-23
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("rail_crane_business_record")
public class CraneBusinessRecord implements Serializable{
    private static final long serialVersionUID=1L;

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO, value = "id_")
    private Long id;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id_")
    private String tenantId;

    /**
     * 机械id
     */
    @TableField(value = "mechanical_id_")
    private String mechanicalId;

    /**
     * 设备id
     */
    @TableField(value = "device_id_")
    private String deviceId;

    /**
     * 设备code
     */
    @TableField(value = "device_code_")
    private String deviceCode;

    /**
     * 设备名称
     */
    @TableField(value = "device_name_")
    private String deviceName;

    /**
     * 工作循环起始时间
     */
    @TableField(value = "work_start_time_")
    private Date workStartTime;

    /**
     * 工作循环结束时间
     */
    @TableField(value = "work_end_time_")
    private Date workEndTime;

    /**
     * 力臂
     */
    @TableField(value = "arm_force_")
    private BigDecimal armForce;

    /**
     * 力臂告警 0-正常，1-告警
     */
    @TableField(value = "alarm_arm_force_")
    private Integer alarmArmForce;

    /**
     * 大臂长度
     */
    @TableField(value = "big_arm_len_")
    private BigDecimal bigArmLen;

    /**
     * 大臂长度告警 0-正常，1-告警
     */
    @TableField(value = "alarm_big_arm_len_")
    private Integer alarmBigArmLen;

    /**
     * 水平度X
     */
    @TableField(value = "level_x_")
    private BigDecimal levelX;

    /**
     * 水平度X告警 0-正常，1-告警
     */
    @TableField(value = "alarm_level_x_")
    private Integer alarmLevelX;

    /**
     * 水平度Y
     */
    @TableField(value = "level_y_")
    private BigDecimal levelY;

    /**
     * 水平度Y告警 0-正常，1-告警
     */
    @TableField(value = "alarm_level_y_")
    private Integer alarmLevelY;

    /**
     * 风速
     */
    @TableField(value = "wind_speed_")
    private BigDecimal windSpeed;

    /**
     * 风速告警 0-正常，1-告警
     */
    @TableField(value = "alarm_wind_speed_")
    private Integer alarmWindSpeed;

    /**
     * 回转角度
     */
    @TableField(value = "rotation_")
    private BigDecimal rotation;

    /**
     * 回转角度告警 0-正常，1-告警
     */
    @TableField(value = "alarm_rotation_")
    private Integer alarmRotation;

    /**
     * 俯仰角
     */
    @TableField(value = "pitch_")
    private BigDecimal pitch;

    /**
     * 俯仰角告警 0-正常，1-告警
     */
    @TableField(value = "alarm_pitch_")
    private Integer alarmPitch;

    /**
     * 主钩力矩
     */
    @TableField(value = "moment_")
    private BigDecimal moment;

    /**
     * 主钩力矩告警 0-正常，1-告警
     */
    @TableField(value = "alarm_moment_")
    private Integer alarmMoment;

    /**
     * 主钩吊重
     */
    @TableField(value = "weight_")
    private BigDecimal weight;

    /**
     * 主钩吊重告警 0-正常，1-告警
     */
    @TableField(value = "alarm_weight_")
    private Integer alarmWeight;

    /**
     * 倾斜度
     */
    @TableField(value = "inclination_")
    private BigDecimal inclination;

    /**
     * 倾倒告警 0-正常，1-告警
     */
    @TableField(value = "alarm_inclination_")
    private Integer alarmInclination;

    /**
     * 风级
     */
    @TableField(value = "wind_level_")
    private BigDecimal windLevel;

    /**
     * 臂尖高度
     */
    @TableField(value = "arm_height_")
    private BigDecimal armHeight;

    /**
     * 作业时长
     */
    @TableField(value = "work_hour_")
    private BigDecimal workHour;

    /**
     * 怠速时长
     */
    @TableField(value = "idling_hour_")
    private BigDecimal idlingHour;

    /**
     * 总工作时长
     */
    @TableField(value = "work_total_hour_")
    private BigDecimal workTotalHour;

    /**
     * 吊装次数
     */
    @TableField(value = "hoisting_times_")
    private Integer hoistingTimes;

    /**
     * 安全限界告警 0-正常，1-告警
     */
    @TableField(value = "alarm_safe_limit_")
    private Integer alarmSafeLimit;

    /**
     * 作业展臂最不利工况可起重吊重告警 0-正常，1-告警
     */
    @TableField(value = "alarm_weight_limit_")
    private Integer alarmWeightLimit;

    /**
     * 最大臂长告警 0-正常，1-告警
     */
    @TableField(value = "alarm_big_arm_len_limit_")
    private Integer alarmBigArmLenLimit;

    /**
     * 施工防侵限告警 0-正常，1-告警
     */
    @TableField(value = "alarm_intrusion_prevention_")
    private Integer alarmIntrusionPrevention;

    /**
     * 防倾倒侵限告警 0-正常，1-告警
     */
    @TableField(value = "alarm_dump_prevention_")
    private Integer alarmDumpPrevention;

    /**
     * 状态 0-正常，1-异常
     */
    @TableField(value = "alarm_state_")
    private Integer alarmState;

    /**
     * 创建人id
     */
    @TableField(value = "create_id_")
    private Long createId;

    /**
     * 创建日期
     */
    @TableField(value = "create_time_")
    private Date createTime;

    /**
     * 修改人id
     */
    @TableField(value = "modify_id_")
    private Long modifyId;

    /**
     * 修改时间
     */
    @TableField(value = "modify_time_")
    private Date modifyTime;

    /**
     * 备注
     */
    @TableField(value = "remark_")
    private String remark;

    /**
     * 开始时间
     */
    @TableField(exist = false)
    private String startTime;
    /**
     * 结束时间
     */
    @TableField(exist = false)
    private String endTime;
    /**
     * 关键字
     */
    @TableField(exist = false)
    private String keyword;

    /**
     * 每日总吊重
     */
    @TableField(exist = false)
    private Double totalWeight;

    /**
     * 是否拼接单位 默认false
     */
    @TableField(exist = false)
    private Boolean appendUnit = false;

    // 数据间隔
    /**
     * 按间隔过滤数据
     */
    @TableField(exist = false)
    private Integer interval;

    // 带单位的字段（用于显示）
    @TableField(exist = false)
    private String armForceWithUnit;
    @TableField(exist = false)
    private String bigArmLenWithUnit;
    @TableField(exist = false)
    private String levelXWithUnit;
    @TableField(exist = false)
    private String levelYWithUnit;
    @TableField(exist = false)
    private String windSpeedWithUnit;
    @TableField(exist = false)
    private String rotationWithUnit;
    @TableField(exist = false)
    private String pitchWithUnit;
    @TableField(exist = false)
    private String momentWithUnit;
    @TableField(exist = false)
    private String weightWithUnit;
    @TableField(exist = false)
    private String inclinationWithUnit;
    @TableField(exist = false)
    private String windLevelWithUnit;
    @TableField(exist = false)
    private String armHeightWithUnit;
    @TableField(exist = false)
    private String workHourWithUnit;
    @TableField(exist = false)
    private String idlingHourWithUnit;
    @TableField(exist = false)
    private String workTotalHourWithUnit;
}
